﻿using Prism.DryIoc;
using Prism.Ioc;
using System.Configuration;
using System.Data;
using System.Windows;
using WpfForPrism区域.Views;

namespace WpfForPrism区域
{
    /// <summary>
    /// Interaction logic for App.xaml
    /// </summary>
    public partial class App : PrismApplication
    {
        /// <summary>
        /// 设置启动页面
        /// </summary>
        /// <returns></returns>
        /// <exception cref="NotImplementedException"></exception>
        protected override Window CreateShell()
        {
            return Container.Resolve<MainWindow>();
        }

        /// <summary>
        /// 依赖注入，注入服务
        /// </summary>
        protected override void RegisterTypes(IContainerRegistry containerRegistry)
        {
            //进行依赖注入
            containerRegistry.RegisterForNavigation<UCA>();//默认为类名(窗体名)，可通过重载重新命名，但需注意xaml中也要修改
            containerRegistry.RegisterForNavigation<UCB>();
            containerRegistry.RegisterForNavigation<UCC>();
        }
    }

}
